﻿
//Author: 张亚涛
//createtime:2015-12-17 22:46:03
//Description: 

using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
using DAL;

namespace BLL
{

    /// <summary>
    /// 该类提供了一系列操作 "MemberCar" 表的方法;
    /// </summary>
    public class MemberCarService
    {
        #region .对本表的维护.
        #region select data
        /// <summary>
        /// 返回MemberCar表的所有数据 
        /// </summary>
        /// <param name="OpenID">微信ID</param>
        /// <returns></returns>        
        public static List<MemberCar> GetAllMemberCar(string OpenID)
        {
            return MemberCarBase.GetAllMemberCar(OpenID);
        }
        /// <summary>
        /// 根据MemberCar表的ID字段返回数据
        /// </summary>
        /// <param name="id">ID</param>
        /// <returns></returns>        
        public static MemberCar GetMemberCarById(long id)
        {
            return MemberCarBase.GetMemberCarById(id);
        }
        /// <summary>
        /// 根据会员ID字段返回会员车辆信息
        /// </summary>
        /// <param name="OpenID">微信ID</param>
        /// <returns></returns>       
        public static MemberCar GetMemberCarByOpenID(string OpenID)
        {
            return MemberCarBase.GetMemberCarByOpenID(OpenID);
        }
        /// <summary>
        /// 获得车辆颜色
        /// </summary>
        /// <param name="id">ID</param>
        /// <returns></returns>       
        public static string GetColor(long id)
        {
            return MemberCarBase.GetColor(id);
        }
        #endregion
        #region delete data
        /// <summary>
        /// 根据MemberCar表的ID字段删除数据 
        /// </summary>
        /// <param name="id">id</param>
        /// <returns>返回受影响的行数</returns>
        public static int DeleteMemberCarById(long id)
        {
            return MemberCarBase.DeleteMemberCarById(id);
        }
        #endregion
        #region update data
        /// <summary>
        /// 根据MemberCar表的ID字段更新数据 
        /// </summary>
        /// <param name="id">Id</param>
        /// <param name="MemberCar">memberCar</param>
        /// <returns>返回受影响的行数</returns>
        public static int UpdateMemberCarById(MemberCar memberCar)
        {
            return MemberCarBase.UpdateMemberCarById(memberCar);
        }
        #endregion
        #region insert data
        /// <summary>
        /// 向MemberCar表插入一条数据，插入成功则返回自增列数值，插入不成功则返回-1 
        /// </summary>
        /// <param name="memberCar">MemberCar</param>        
        /// <returns></returns>
        public static int AddMemberCar(MemberCar memberCar)
        {
            return MemberCarBase.AddMemberCar(memberCar);
        }
        #endregion
        #endregion

        #region .SQL语句汇总.
        /// <summary>
        /// 返回MemberCar表的所有数据（SQL语句） 
        /// </summary>
        /// <returns></returns>        
        public static string GetAllMemberCar_SQL()
        {
            return MemberCarBase.GetAllMemberCar_SQL();
        }
        #endregion
    }
}